#include "selectserver.hpp"
#include "err.hpp"
#include <memory>
using namespace select_ns;
using namespace std;
static void Usage(std::string proc)
{
    std::cerr << "Usage:\n\t" << proc << " port\r\n\r\n";
}
std::string transaction(const std::string &request)
{
    return request;
}
int main(int argc, char *argv[])
{
    if (argc != 2)
    {
        Usage(argv[0]);
        exit(USAGE_ERR);
    }
    unique_ptr<SelectServer> svr(new SelectServer(transaction, atoi(argv[1])));
    svr->initServer();
    svr->start();
    return 0;
}